package com.lovo.project.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.lovo.project.bean.DataBean;
import com.lovo.project.bean.SaleInGoodsBean;
import com.lovo.project.mapper.SaleInGoodsMapper;
import com.lovo.project.service.SaleInGoodsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.time.LocalDate;
import java.util.List;

@Service
public class SaleInGoodsServiceImpl extends ServiceImpl<SaleInGoodsMapper, SaleInGoodsBean>implements SaleInGoodsService {
    @Autowired
    SaleInGoodsMapper saleInGoodsMapper;

    @Override
    public List<SaleInGoodsBean> querySaleInGoodsList(QueryWrapper queryWrapper) {
        List<SaleInGoodsBean> list=saleInGoodsMapper.selectList(queryWrapper);
        return list;
    }

    @Override
    public List<DataBean> queryData(LocalDate startTime, LocalDate endTime) {
        List<DataBean> list=saleInGoodsMapper.selectData(startTime,endTime);
        return list;
    }
}
